package com.zhuangwei.service.impl;

import com.zhuangwei.dao.UserMapper;
import com.zhuangwei.domain.User;
import com.zhuangwei.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author LeviCoder
 * @create 2019-01-30 14:01
 */
@Slf4j
@Service
public class UserServiceImpl implements UserService
{
    @Resource
    private UserMapper userDao;

    @Override
    public User save()
    {
        return userDao.save();
    }

    @Override
    public User update(Long id)
    {
        return userDao.update(id);
    }

    @Override
    public User delete(Long id)
    {
        return userDao.delete(id);
    }

    @Override
    public List<User> find()
    {
        return userDao.find();
    }

    @Override
    public User find(Long id)
    {
        return userDao.find(id);
    }

    @Override
    public User find(String name)
    {
        return userDao.find(name);
    }
}
